﻿using System;
using System.Xml;

namespace SectionSignAndFilled.MaterialManager
{
	internal class XMLTools
	{
		public static XmlNode FindNodeByAtt(XmlNodeList childNodes, string attName, string attValue)
		{
			for (int i = 0; i < childNodes.Count; i++)
			{
				XmlAttributeCollection attributes = childNodes[i].Attributes;
				for (int j = 0; j < attributes.Count; j++)
				{
					if (attributes[j].Name == attName && attributes[j].Value == attValue)
					{
						return childNodes[i];
					}
				}
			}
			return null;
		}
	}
}
